package com.lebang.mapper;

import com.lebang.domain.MemberWallet;
import com.lebang.example.MemberWalletExample;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * MemberWalletMapper继承基类
 */
@Mapper
public interface MemberWalletMapper extends MyBatisBaseDao<MemberWallet, String, MemberWalletExample> {

    Long selectRevision(String memberId);

    int OutLayMoney(@Param("memberId") String memberId, @Param("modifyAmount") Integer modifyAmount, @Param("revision") Long revision);

    Long selectMoneyByPrimaryKey(String memberId);

    int checkExist(String memberId);

    int IncomeMoney(@Param("memberId") String memberId, @Param("modifyAmount") Integer modifyAmount, @Param("revision") Long revision);

    int addFail(String memberId);

    void logoutMoney(@Param("memberId") String memberId);

    List<MemberWallet> selectNegativeMoney();
}